<!DOCTYPE html>
<html lang='en'>

<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>Document</title>
    <script src='./vue.js'></script>
    <script src="./data.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        #app {
            width: 500px;
            margin: 0 auto;
        }

        .car {
            width: 440px;
            display: flex;
            flex-wrap: wrap;
        }

        .Goods {
            width: 50%;
            height: 410px;
            border: red solid 1px;
            padding: 10px;
            position: relative
        }

        .Goods>img {
            width: 100%;
            height: 75%;
        }

        .title {
            text-align: justify;
            line-height: 24px;
        }

        .words {
            font-size: 14px;
            background-color: #f6a2a2;
            color: rgb(115, 5, 154);
            margin-right: 7px;
            font-weight: bold;

        }

        .left {
            position: absolute;
            bottom: 8px;
            left: 10px;
            color: rgb(115, 5, 154);
        }

        .right {
            position: absolute;
            bottom: 8px;
            right: 10px;
            color: rgb(115, 5, 154);
        }
    </style>
</head>

<body>
    <div id='app'>
        <goods :mylist="list"></goods>
    </div>
</body>

<template id="Goods">
    <div class="car">
        <div class="Goods" v-for="item in mylist" :key="item.signGoodsId">
            <img :src='item.image'>
            <p class="title"><span v-for="words in item.props" class="words">{{words}}</span></p>
            <span class="left">￥ {{item.price}}</span><span class="right">{{item.collectNum}}❤</span>
        </div>
    </div>
</template>

<script>

    const goods = {
        template: '#Goods',
        props: ['mylist'],
        data() {
            return {}
        },
        methods: {},
    }

    const app = {
        data() {
            return {
                list,
            }
        },
        methods: {},
        components: {
            goods,
        }
    }
    const vm = Vue.createApp(app).mount('#app')
</script>

</html>